/*
 * ring.h
 *
 *  Created on: Jun 2, 2022
 *      Author: 86153
 */
#include "main.h"
#include"stdio.h"
#ifndef INC_RING_H_
#define INC_RING_H_
#define  RINGBUFF_LEN          (139)     //定义最大接收字节数 500
#define  RINGBUFF_OK           1
#define  RINGBUFF_ERR          0
typedef struct
{
    uint16_t Head;
    uint16_t Tail;
    uint16_t Lenght;
    float  Ring_data[RINGBUFF_LEN];
}RingBuff_t;
void RingBuff_Init(RingBuff_t *ringBuff);
float Write_RingBuff(float data,RingBuff_t *ringBuff);
float Read_RingBuff(RingBuff_t *ringBuff);
#endif /* INC_RING_H_ */
